package com.ouc.openplatform.common;

import java.util.List;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.UpdateProvider;
public abstract interface CommonMapper<T>
{
  //定制的接口
  @DeleteProvider(type=CommonMapperImpl.class, method="dynamicSQL")
  public abstract int deleteByIDS(@Param("ids") Object[] paramArrayOfObject);
  
  @SelectProvider(type=CommonMapperImpl.class, method="dynamicSQL")
  public abstract List<T> select(T paramT);
  
  @SelectProvider(type=CommonMapperImpl.class, method="dynamicSQL")
  public abstract int selectCount(T paramT);
  
  @SelectProvider(type=CommonMapperImpl.class, method="dynamicSQL")
  public abstract T selectByPrimaryKey(Object paramObject);
  
  @InsertProvider(type=CommonMapperImpl.class, method="dynamicSQL")
  public abstract int insert(T paramT);
  
  @InsertProvider(type=CommonMapperImpl.class, method="dynamicSQL")
  public abstract int insertSelective(T paramT);
  
  @DeleteProvider(type=CommonMapperImpl.class, method="dynamicSQL")
  public abstract int delete(T paramT);
  
  @DeleteProvider(type=CommonMapperImpl.class, method="dynamicSQL")
  public abstract int deleteByPrimaryKey(Object paramObject);
  
  @UpdateProvider(type=CommonMapperImpl.class, method="dynamicSQL")
  public abstract int updateByPrimaryKey(T paramT);
  
  @UpdateProvider(type=CommonMapperImpl.class, method="dynamicSQL")
  public abstract int updateByPrimaryKeySelective(T paramT);
  
  @SelectProvider(type = CommonMapperImpl.class, method = "dynamicSQL")
  int selectCountByExample(Object example);

  @DeleteProvider(type = CommonMapperImpl.class, method = "dynamicSQL")
  int deleteByExample(Object example);

  @SelectProvider(type = CommonMapperImpl.class, method = "dynamicSQL")
  List<T> selectByExample(Object example);

  @UpdateProvider(type = CommonMapperImpl.class, method = "dynamicSQL")
  int updateByExampleSelective(@Param("record") T record, @Param("example") Object example);

  @UpdateProvider(type = CommonMapperImpl.class, method = "dynamicSQL")
  int updateByExample(@Param("record") T record, @Param("example") Object example);
}
